How do I add the Company Name to the report header section?

I've written 2 custom crystal reports based on the AR_InvoiceHistoryDetail and AR_InvoiceHistoryHeader. I want the company name to print on the header of the reports but don't see a natural link that could be applied. I've tried linking one of the tables from AR_InvoiceHistoryHeader to the CompanyName field in the SY_Company table specifying the link as Inner Join not equal to != but when I run the report I see all 4 company names, not on the same page but on various pages, even though the data is coming from the unique history of each company. Is there another way of linking the SY_Company table to the report?

 

 

John

  • The MAS90's suggestion will work for now (through 4.3 SU), but at some point I expect this table will disappear. 

     

    The Sy0_CompanyParameters table used to be the way that all forms determined the current company because some magic in MAS90 would always filter this table to contain only the current company, but now in the new framework this magic is done by MAS90 passing the company name into a formula (CompanyCode for the code and CompanyName for the name). 

     

    Of course if you're writing a custom report, then these fields aren't passed and for now we're dependant on SY0_CompanyParameters.  Anyone know what's coming, so that we might ensure our reports are more likely to compatible in the future?

  • I would just use no link.   Have you tried this?

     

    Dawn

  • What would the advantage of no link be? (other than to get the warning message)
  • I did try that but then company names not associated with the company I was running the report from would appear on the report making things rather confusing. I got round this by taking the long way round and creating company specific copies of the reports, all added to the AR custom reports menu but functional. Not the cleanest solution but it works.

     

    Thanks for the suggestions though.

    John

  • That's odd - SY0_CompanyParameters should run only for the company you are running.  You didn't use SY_Company, correct?  That contains records for all companies.

     

    Dawn

  • Yes that must be where I made my mistake, using SY_Company instead of the parameters file. I should have looked more carefully through the list of SY tables as I was under the impression that SY_Company replaced the parameter file and wasn't expecting to see it. I'll know to use that next time round.

     

    Thanks Dawn.