Results 1 to 3 of 3

Thread: Crystal Report - Access global var within a report. {URGENT!}

  1. #1

    Thread Starter
    Fanatic Member jcavard's Avatar
    Join Date
    Jul 2005
    Location
    Quebec, CANADA
    Posts
    534

    Crystal Report - Access global var within a report. {URGENT!}

    Hi! I have a crystal report that prints the content of a dataset, but I would like to print some information in the header that is not in teh dataset. It's a global var that hold that value and I would like to print it in the CR. So, can I access Global Var from within crystal report, or can I pass it has a parameter!?

    Also, I would like to know whether it is possible to display a field or another. Let's say I have information in french and in english. I want to print the french field if the global value for the language is french, and the english field of the global value for the language setting is set to english. Anyone?

    Thank you all!
    Last edited by jcavard; Aug 30th, 2005 at 03:18 PM.
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

    accoustic emo-rock band: a tailormade fable

    Visual Studio 2003 / Framework 1.1

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Crystal Report - Access global var within a report. {URGENT!}

    1. You need to create a parameter in CR and bind a textbox or other control on your report to it as its control source. In VB you would then pass the global variable to it.

    2. You need to create 2 duplicate Details sections (one for English and one for French) and write some CR code in the Selection Expert dialog for each Details section. Then in the CR code you will set visible the section that is related to the parameter's value for that section, etc. This will help you to achieve turning off the English details if the parameter is set for French and visa versa.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Fanatic Member jcavard's Avatar
    Join Date
    Jul 2005
    Location
    Quebec, CANADA
    Posts
    534

    Re: Crystal Report - Access global var within a report. {URGENT!}

    thank you dude! that really help, but I meant this one my bad, I'm sorry. its a reporting a runtime generated dataset issue...
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

    accoustic emo-rock band: a tailormade fable

    Visual Studio 2003 / Framework 1.1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width