Set height and width dynamically for page/section in crystal report -


i using crystal report printing details. have 2 issues while printing.

  1. set height/width dynamically section details

i want change height , width section dynamically through code. height , width come user settings need dynamic. when checked, there option set section height programmatically not working. using below code set section height

reportdocument rd = new reportdocument(); section section = rd.reportdefinition.sections["section3"]; section.height = 1; 

when use code, gives me error "system.runtime.interopservices.comexception: section height not valid."

i want set "gap between details" dynamically. possible?

  1. set page content height dynamically

i want set page content height dynamically. can set page height , width design -> page setup -> page options -> set horizontal , vertical values.

what happening in case is, using crystal report tp print barcodes. when page height big, prints empty barcodes dont want. want set page content height based on number of barcodes going print. how can this?

can me solve these 2 issues?

i finding how resolve question. me, works:

reportdocument rd = new reportdocument(); rd.reportdefinition.sections["section5"].height = 1000; 

try this, ok?


Comments